﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ChooseSkillIcon : MonoBehaviour
{

    public Image IconImg;
    public Text SkillName;
    public Outline textEffect;
    public Image IconBgImg;

    /// <summary>
    /// 设置BP技能图标信息
    /// </summary>
    /// <param name="SkillID"></param>
    public void SetBPIconInfo(ushort SkillID ,bool isBan)
    {
        SkillIconInfo info = MatchManager._instance.GetSkillInfo(SkillID);
        IconImg.sprite = IconSpriteManager._instance.GetSkillIconFromIndex(SkillID);
        SkillName.text = info.SkillName;
        if (isBan)
        {
            IconBgImg.color = Color.gray;
            SkillName.color =new Color(1,0.38f,0.38f);
            textEffect.effectColor = new Color(0.41f,0.02f,0.02f);
        }
        else
        {
            IconBgImg.color = new Color(0,0.87f,1);
            textEffect.effectColor = new Color(0.55f,0.85f,1);
            SkillName.color = new Color(0,0.24f,0.68f);
        }
    }
}
